using System;
using System.Windows.Data;

namespace SmartBoard.Converters
{
    public class BoolToContentConverter : IValueConverter
    {
        public object TrueValueContent { get; set; }
        public object FalseValueContent { get; set; }

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var boolValue = (bool)value;
            return boolValue ?  TrueValueContent:FalseValueContent;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return value == TrueValueContent;
        }
        #endregion
    }
}